import request from "@/utils/request.js"

/*获取学生列表 */
export function listStudent(params){
    return request({
         url:'/student/list',
         method:'GET',
         params,
    })
   
}

/*删除学生*/
export function deleteStudent(stuId){
    return request({
         url:`/student/${stuId}`,
         method:'DELETE',
    })
   
}

/* 添加学生 */
export function addStudent(data){
    return request({
         url:`/student`,
         method:'POST',
         //body传参
         data,
    })
   
}

/* 编辑学生信息 */
export function editStudent(data){
    return request({
         url:`/student`,
         method:'PUT',
         //body传参
         data,
    })
   
}